package cn.gmcx.lazy.izze.controller;


import cn.gmcx.lazy.izze.pojo.Dynamic;
import cn.gmcx.lazy.izze.pojo.DynamicVo;
import cn.gmcx.lazy.izze.service.IDynamicService;
import cn.gmcx.lazy.izze.utils.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 项目动态，保存角色操作 前端控制器
 * </p>
 *
 * @author GMCX
 * @since 2024-07-01
 */
@RestController
@RequestMapping("/dynamic")
public class DynamicController {
    @Autowired
    private IDynamicService dynamicService;

    @GetMapping("/dynamic_select_id")
    public Result selectDynamicById(@RequestParam("id") Integer id){

        List<DynamicVo> list = dynamicService.getDynamicList(id);

        return Result.success(list);
    }
}
